import VueRouter from 'vue-router';

import home from "./components/tabbar/HomeContainer.vue";
import vip from "./components/tabbar/VipContainer.vue";
import shopcar from "./components/tabbar/ShopcarContainer.vue";
import search from "./components/tabbar/SearchContainer.vue";

import newsList from './components/news/NewsList.vue';
import newsInfo from './components/news/NewsInfo.vue';

import photolist from './components/photos/PhotoList.vue';
import photoInfo from './components/photos/PhotoInfo.vue';

import goodslist from './components/goods/GoodsList.vue';
import goodsinfo from './components/goods/GoodsInfo.vue';

var vr = new VueRouter({
    routes:[
        {path:"/",redirect: "home"},
        {path:"/home",component: home},
        {path:"/vip",component: vip},
        {path:"/shopcar",component: shopcar},
        {path:"/search",component: search},
        
        {path:"/home/newsList",component: newsList},//新闻列表
        {path:"/home/newsList/newsInfo/:id",component: newsInfo},

        {path:"/home/photolist",component: photolist},//单击图片分享显示的页面
        {path:"/home/photolist/photoInfo/:id",component: photoInfo},//单击图片分享显示的页面

        {path:"/home/goodslist",component: goodslist},//单击图片分享显示的页面
        {path:"/home/goodslist/goodsinfo/:id",component: goodsinfo},//单击图片分享显示的页面
    ],
    linkActiveClass: "mui-active"
})
export default vr;